#ifndef RUNNABLE_H
#define RUNNABLE_H

#include <windows.h>

DWORD WINAPI threadEntryPoint (LPVOID args);

/*-------------------------------------------------------------------------------------
--
--	CLASS: Runnable
--
--	Date: April 1, 2010
--
--	REVISIONS (Date and Description):
--
--	DESIGNER: Erick Ribeiro
--
--	PROGRAMMER: Erick Ribeiro
--
--  INTERFACE: class Runnable
--
--  RETURNS: N/A
--
--	NOTES: Extendable class to provide the creation, execution, and haulting of a 
--         thread.
--
-------------------------------------------------------------------------------------*/
class Runnable
{
public:
    Runnable ();

    bool startRunning ();
    bool isRunning ();
    void stopRunning ();

    friend DWORD WINAPI threadEntryPoint (LPVOID args);

protected:
    virtual void run ();

private:
    HANDLE thread;
    DWORD threadID;
    bool running;
};

#endif
